/**********************************************************************************
// DemoD3DGame Source
//
// Creation:	06 Abr 2011
// Updated:		06 Abr 2011
// Compiler:	Visual Studio 2011
//
// Notes:		A simple project to test the Direct3DGame class.
//				The Direct3DGame class is a base class for others, more 
//              advanced classes, that must subclass it and implement 
//              drawing methods using Direct3D.
//
**********************************************************************************/

#define WIN32_LEAN_AND_MEAN  // just say no to MFC

#include "Resources.h"
#include "D3DGame.h"

/*************************************************************/


class Game : public D3DGame
{
private:
	char text[80];

public:
	void GameInit();
	void GameLogic();
	void GameDraw();
};

/**********************************************************************************/

void Game::GameInit() 
{ }

/**********************************************************************************/

void Game::GameLogic()
{ EndsOnEscape(); } 

/**********************************************************************************/

void Game::GameDraw() 
{
	sprintf_s(text, "Direct 3D Demo");
	sysFont->Draw(10,10, text);
} 

/**********************************************************************************/
/*                                  WinMain                                       */
/**********************************************************************************/

int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
	Game d3dDemo;

	//d3dDemo.SetWindowMode(WINDOWED);
	d3dDemo.SetWindowSize(1024,768);
	d3dDemo.SetWindowBgColor(10,25,55);
	d3dDemo.SetWindowTitle(string("Direct3D Demo"));
	d3dDemo.SetWindowIcon(LoadIcon(hInstance, MAKEINTRESOURCE(IDI_ICON)));
	d3dDemo.SetWindowCursor(LoadCursor(hInstance, MAKEINTRESOURCE(IDI_CURSOR)));
	d3dDemo.Initialize(hInstance);
	d3dDemo.Start();
	
	return 0;

}

/**********************************************************************************/

